<extend name="Layout:layout_dialog" />
<block name="body_main">
    <form action="{:AddonU('channel_edit_save')}" method="post" class="xsui-form">
        <fieldset>
            <div class="xsui-form-field">
                <label>栏位名称：</label>
                <input type="text" name="title" placeholder="栏位名称" required="required" value="{$data.title}"/>
            </div>
            <div class="xsui-form-field">
                <label>栏位位置：</label>
                <select name="pid" data-url="{:AddonU('get_channel_tree_json')}" data-value="{$data.pid}"></select>
            </div>
            <div class="xsui-form-field">
                <label>栏目类型：</label>
                <sohtml:radio name="type_id" items='[{"v":"1","t":"单独页面","c":"会生成一个全新的页面"},{"v":"2","t":"文章栏目","c":"用于在此栏目下添加文章"},{"v":"3","t":"分类链接","c":"可以链接到指定分类"},{"v":"4","t":"链接地址","c":"增加外链，如论坛地址"},{"v":"5","t":"文件栏目","c":"用于在此栏目下添加文件，如图片或下载"}]' value="{$data.type_id|default=1}" required="required" />
            </div>
            <div class="xsui-form-field">
                <label>前台显示：</label>
                <sohtml:radio name="status" items="1=显示;0=隐藏" value="{$data.status|default=0}" />
            </div>
        </fieldset>
        <input type="hidden" name="id" value="{$data.id}" />
        <button type="submit" class="ui-state-default"><i class="fa fa-save"></i>保存</button>
        <button type="reset" class="ui-state-default">重置</button>
    </form>  
</block>
<block name="body_after">
    <script>
        $(function () {
            FormPage.ui_init();
            ajax_combobox({selector: 'select[name="pid"]', def_option: '请选择位置'});
        })
    </script>
</block>